Skip to content

Add shared declaration annotations and Matrix preprocessing - #18

Merged
bytetroll merged 2 commits into
codex/matrix-mutable-parametersfrom
codex/matrix-annotations
Oct 29, 2026
Merged

bytetroll merged 2 commits into
codex/matrix-mutable-parametersfrom
codex/matrix-annotations

Conversation

@bytetroll

Copy link
Copy Markdown
Contributor

Matrix declaration metadata now supports the same stackable @name(...) surface as Ny, plus note name with value, property being value. Both frontends expose typed scalar properties to compiler reflection and generated nil.std.reflection snapshots. Existing opaque Ny composite payloads remain available to consumers.

This PR is stacked on #17 because its examples and standard library use the mutable/reference parameter surface.

  • Add shared parsing for positional values and named properties, with exact annotation identities, duplicate-key diagnostics, numeric bounds, and language-specific string rules.
  • Run Matrix through the shared preprocessor while protecting raw/formatted text, comments, escaped names, and annotation payloads. Preserve workspace includes and withhold unsafe source edits when preprocessing changes source locations.
  • Add VS Code highlighting/snippets and LSP metadata completion; keep annotation payloads out of code navigation and symbol discovery.
  • Preserve metadata across text/binary/native routes. Fix binary VM class annotation decoding and text output dropping @inline properties. Document the contract in NIL-0020 and record findings in F77.

Validation: LLVM-enabled Release build; full CTest suite with 512 passing, one optional PostgreSQL test skipped, and zero failures; all 115 extension tests passing. Paired Ny/Matrix metadata fixtures cover text/binary VM, both bundle formats, LLVM JIT, and native compilation; reflection snapshots are consumed by Ny and Matrix analyzers. Repository policy and diff whitespace checks are clean.

The initial structured profile covers declaration metadata and scalar properties. Executable decorators, getter/setter properties, structured arrays/maps, field/parameter annotations, and a complete preprocessing source map remain future work. Legacy opaque Ny payloads are retained without evaluation.

Preserve annotation and NILData findings while carrying the current master integration through the stacked pull request. TypeScript checking and all 122 extension unit tests pass.
@bytetroll
bytetroll merged commit 726f575 into codex/matrix-mutable-parameters Oct 29, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant